<%@ Page Language="C#" EnableViewState="false" ValidateRequest="false" AutoEventWireup="true" Inherits="Syrinx.Gui.AspNet.Nitobi2.NitobiBasePage" 
	MasterPageFile="~/App_ThemeMasters/NoStyle/AdminOneColumnLayout.Master" %>

<%@ Register Assembly="Swaf.Gui.AspNet2" Namespace="Swaf.Gui.AspNet2" TagPrefix="swf" %>
<%@ Register Assembly="ScsAspNet" Namespace="Syrinx.Gui.AspNet.Nitobi2" TagPrefix="snc" %><%@ Register Assembly="NitobiControls" Namespace="Nitobi" TagPrefix="ntb" %>

<!--#include file="~/SiteControls/RegisterStandardControls.txt"-->
<!--#include file="../SiteControls/StandardHeaderPageContent.inc"-->
<!--#include file="../SiteControls/StandardFooterPageContent.inc"-->

<asp:Content ContentPlaceHolderID="title" runat="server" ID="c1">
	<%SecurityPrivilege = "AppFunctions.ManageProducts"; %>
	<swf:BizProc ID="sArt1" runat="server" factoryName="eComProducts">
		<State pid="" includeSelf="true" entireTree="true" EditModeSessionKey="GlobalEdit" />
		<ParentBizProc id="loginBP" />
	</swf:BizProc>
</asp:Content>

<asp:Content ContentPlaceHolderID="mainContent" runat="server" ID="c3">
    <span class="button4"><snc:ActionButton runat="server" ID="editMode" Actions="sArt1.SwitchEdit" Text="Edit" SessionBoolSwitch="GlobalEdit" /></span>
    <span class="button1"><snc:ActionButton runat="server" ID="addBtn" Actions="sArt1.AddBizObj" Text="Add" /></span>
    <span class="button6"><snc:ActionButton runat="server" ID="updateBtn" Actions="sArt1.UpdateBizObj" Text="Update" /></span>
    <span class="button1"><snc:ActionButton runat="server" ID="cancelBtn" Actions="sArt1.CancelEdits" Text="Cancel" /></span>
    <span class="button5"><snc:ActionButton runat="server" ID="deleteBtn" Actions="sArt1.DeleteBizObj" Text="Delete" ClientClick="if(!confirm('Are you sure you want to delete?'))return false;" /></span>
    <span class="button1"><snc:ActionButton runat="server" ID="setPicBtn" Actions="sArt1.SetArticlePicture" Text="Set Image" 
        PopupPage="../popups/SetArticleImagePopup.aspx" PopupHeight="650px" PopupWidth="800px" PopupTitle="Select a primary image for this product." /></span>
    <span class="button1"><snc:ActionButton runat="server" ID="generateBtn" Actions="sArt1.GenerateFromMedia" Text="Generate From Media" 
        PopupPage="../popups/ImageArticleGenPopup.aspx" PopupHeight="650px" PopupWidth="800px" PopupTitle="Generate products from media directory." /></span>
    <span class="button1"><snc:ActionButton runat="server" ID="assocBtn" Actions="sArt1.SetAsChildArticle" Text="Associate Article" 
        PopupPage="../std/ArticleAssociationPopup.aspx" PopupHeight="650px" PopupWidth="800px" PopupTitle="Associate an article to this product." /></span>
    <div class="clearer"></div>

    <div class="verticalbg"> 
	    <div>
	        <div >
		        <snc:Grid ID="articleList1Display" runat="server" Width="350px" Height="500px"  
			        ShowToolbar="false" ParentBizProcIds="sArt1" Mode="LiveScrolling">
			        <Columns>
				        <ntb:KeyColumn DataField="id" visible="false" />
				        <ntb:BoundColumn DataField="depthName" HeaderText="Name" width="330" />
			        </Columns>
		        </snc:Grid>
	        </div>
        </div>
    </div>
    
    <div class="contentwrap">
        <div class="horizontalbg">
	    <snc:NitobiBizObjDisplay ID="NitobiBizObjDisplay2" runat="server" 
		    ReadOnlyTemplate="eCom.Gui.AspNet.ProductRODisplay,eCom.Gui.AspNet.ProductDetailsROView" 
		    EditableTemplate="eCom.Gui.AspNet.ProductRWDisplay,eCom.Gui.AspNet.ProductDetailsRWView" 
		    ParentBizProcIds="sArt1" >
			    <macros>
				    <Entry name="navLink" type="String">../std/ArticleView.aspx?gArt1pid=$pid$&amp;gArt1id=$id$</Entry>
				    <Entry name="imageRes" type="String">Thumbnail</Entry>
			    </macros>
		    </snc:NitobiBizObjDisplay>
         </div>  
         <div class="clearer"></div>
        <span class="button6"><snc:ActionButton runat="server" ID="ActionButton1" Actions="sArt1.UpdateBizObj" Text="Update" /></span>
   </div>
    <div class="clearer"></div>
</asp:Content>
